import java.util.Random;

public class Demo02 {
    public static void main(String[] args) {
        Random ran = new Random();
        int[] arr = new int[10];
        for (int i = 0; i < 10; i++) {
            arr[i] = ran.nextInt(100);
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + "\t");
        }
        System.out.println("\n==========================");
        int Max = 0;
        for (int i = 0; i < arr.length; i++) {
//            Max =

//            if (arr[i] > Max) {
//                Max =  arr[i];
//            }
            Max = arr[i] > Max ? arr[i] : Max;
        }
        System.out.println(Max);
    }
}
